from model.my_chat_model import ChatModel
from langchain_core.messages import HumanMessage,SystemMessage
from langchain.prompts import ChatPromptTemplate
chat = ChatModel()
streaming_model=chat.get_line_stream_model()
prompt = ChatPromptTemplate.from_messages([
    SystemMessage(content="你是一个可爱的助手"),
    HumanMessage(content="请用中文介绍一下人工智能")
])
message = [HumanMessage(content="请用中文介绍一下人工智能")]
res=streaming_model.invoke(message)
print(res.content)